#ifndef SF_D3D9RENDER_H_
#define SF_D3D9RENDER_H_
#pragma once
#include "IRender.h"
#include <d3d9.h>
#include <d3dx9.h>
#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")

namespace SF
{
	class D3D9Render:public IRender
	{
	public:
		D3D9Render(void);
	public:
		virtual ~D3D9Render(void);
		virtual bool BeginRender();
		virtual bool EndRender();
		virtual void RenderRect(const recti& rkRect = recti(0,0,100,100),uint32 uiColor = 0xFFFFFFFF);
	private:
		virtual bool Initialize(uint32 uiHandle,const size2di& rkSize = size2di(800,600),bool bFullScreen = false);

	private:
		HWND 				m_hWnd;
		IDirect3D9*			m_pkD3D9;
		IDirect3DDevice9*	m_pkD3D9Device;
	};
}
#endif

